The online racing simulator
Searching in All forums
(738 results)
Scawen
Developer
Thanks again for the testing and feedback.

D46 contains updates for the low speed steering, making it faster to change lean angle, while leaving the high speed steering unaffected. I hope you'll find this makes it better at low speeds.

I hope that low speed stability has not been diminished. It seemed fine on the bikes I tested. Looking

Interestingly (for me at least) it seems that a change on the final day or two before D45 was released, allowed the high speed steering model to work fine at lower speeds than the test version I had before that. So in D46 the high speed model goes all the way down to 36 km/h before the low speed model is brought in.

Changes in D46:

Low speed steering model changes lean angle in half the time
Low speed to high speed model transition is at half the speed
- Feet down model up to 7 km/h
- Low speed model only from 7 km/h to 18 km/h
- Interpolated model from 18 km/h to 36 km/h
- High speed model only above 36 km/h
FIX: Steering glitch between feet down model and low speed model

Download:

https://www.lfs.net/forum/thread/102117
Scawen
Developer
Bike riders, please can you test the new bike steering model in D45? It's a lot more stable when changing gear and braking, also it should be better at low speeds thanks to a separate low speed model.

I'll read the other posts since D44 again and make notes to see what I can do or reply as needed. My main focus has been trying to improve this bike model which became less stable due to an improvement in D44. In this version, the underlying physics is unchanged, only the code that steers the front wheel is different. After the bikes are done, I can get back to finish the intermediate incompatible version with improved mod support, so finally I can get back to the development version and new tyre model.

This diversion onto bikes has taken a lot longer than expected, but I know there are a lot of people who enjoy the bikes and I wanted to make it more acceptable for now.


Changes in D45:

New more stable steering model for bikes:

Improved handling and braking ability
A new high speed model is used for speeds above 72 km/h
A special low speed model is used for speeds below 36 km/h
Models are interpolated between 36 and 72 km/h

AI:

Bike can now brake harder (safety margin the same as cars)
FIX: A hang generating path for a mod with "Max up" wrongly set
FIX: Downshift avoidance was too strong (sometimes needed clutch)

Interface:

A message shows the name of any mod that can't be loaded in an SPR


Download:

https://www.lfs.net/forum/thread/102117
Scawen
Developer
Thank you all for the feedback.

About bikes, I can clearly see the issues you report, not only wobbling when braking from high speed, but a lot of movement when coming off or applying the throttle, or tapping the brake a little when leaned over.

I've experimented quite a bit but haven't got any conclusive improvements yet. It seems like I can dial out any issue but doing so always causes other issues at other speeds or conditions. For example I've been able to get really nice accelerating and braking while leaned over at medium to quite high speeds, but then it's a lot worse when the bike hits a relatively small bump and seriously overreacts. The trouble is that what I call the "damping" part of steering (that tries to reduce wobbling by bringing the lean rate near zero) needs to be quite high to react quickly to certain things, but it needs to be gentle in other situations.

I also tried the early stages of a more physical model which tries to simulate gyroscopic forces and really apply steering forces to that. To separate a bike's natural handling, from forces applied by the arms. But it seems a little distant for me to produce such a genuine physical model at this time and I'd rather not do that with the old tyre physics. And a complete model would need body movement too, which isn't for now.

So in that case I'm left with the original plan to improve our semi-physical model (the bike is in physics but the steering is just doing what it needs to do to balance that bike at the required lean). I still hope to improve it, given my increased understanding learned last week, now that we have better bikes and more of a range to test it on, it seems like I should be able to improve it in some way.
Scawen
Developer
I understand but this is not a suggestion thread. It is only to discuss changes that have been made in this test patch.

For suggestions not related to the test patch, we have special forum sections:
https://www.lfs.net/forum/8-Improvement-Suggestions
https://www.lfs.net/forum/532-Mods-System-Suggestions
Scawen
Developer
Test Patch D44 has some more improvements including better (safer) braking and faster bikes. I've tried to deal with some of the issues that come up when bikes are allowed to go faster.

Mainly:
- improve line following by fixing a physics flaw
- taking off over bumps at high speed
- braking too hard for their ability
- unnecessary downshifts

The bikes are a fair bit faster now but there are some issues, with some bikes on some tracks. If you have problems you can turn them down to (approximately) their D43 speed by selecting OK instead of PRO.

Examples:
- Mod 'Cruiser' keeps crashing at AS4 due to wobbles at speed
- Fast bikes crash due to bumps before the South City underpass

I can't yet make LFS detect which bikes will be a problem so should go slower, or detect where fine bumps will bounce them into the air, but it's more fun to let the AI go faster so at this point I think it's better to leave it up to you to slow the bikes manually when needed.

The car AI drivers are better at staying on their line at the corners because of two changes: (1) taking account of engine braking and (2) allowing an extra safety margin when braking. In some cases they may be slightly slower but it's a reasonable price to pay for much more reliable AI across the board.

Other known issues:
- AI can sometimes stall but don't know how to restart engine.
- Some karts at some tracks can repeatedly regenerate path (waiting to reproduce).
- AI were reported as being rougher in D43. Maybe they are better now they have a braking safety margin?
- EV regen does not correctly match brake force. E.g. front and rear force arrows not equal at 50% balance.

Changes in D44:

Misc:

Improved bike physics (affects lean angle and tyre forces)
FIX: Engine brake reduction had no effect for EV but was visible
FIX: Replay OOS after a reset attempt was prevented and long wait

AI:

Bike cornering and acceleration limits increased by 25%
Bikes slow to avoid taking off over large humps in the road
AI braking prediction now takes account of engine braking
Braking prediction includes a safety margin to avoid late braking
Avoid unnecessary downshifts by looking ahead to see if needed
Reset is available even after engine switched off after long wait
FIX: Sometimes could reach a maximum speed and stop accelerating

Download:

https://www.lfs.net/forum/thread/102117
Scawen
Developer
To help me test something, can anyone think of a corner or point on a track where fast vehicles (without downforce) go very light or even take off?

One example is at SO Sprint 1 coming off the dual carriageway section (at top of the slope that leads to the left curve around the roundabout).
Scawen
Developer
Quote from tankslacno :I also get that on every replay, where OOS occured.

Thanks for checking. I've looked now and I think the fault is a line of code I added in an earlier test patch. The time until automatic engine shutdown occurs is normally reset every time there is a user input. The line of code I added, resets that timer each time a request to reset is made. The problem is that is not stored in the replay. So when it was live, no engine shutdown really happened at that time, but in the replay it does. The solution will be to remove that new line of code and make the AI drivers do some other input to delay automatic engine shutdown.

The bug is really nothing to do with AI or bikes, that just makes it more likely to occur.

Quote from Degats :Not sure if this is relevant as I was on D42, but I just had a hard crash to desktop while joining a server with lots of mods.

Thanks for this, but the crash offset is in a generally used function, so in this case I don't know what could have happened.
Scawen
Developer
Quote from Lucas McFly :As for cars, the right turn after a long straight in the 2nd sector seems to be a problem.

Thanks for this test, I've now observed the wide cornering of the XFG and XRG after the long straight.

I think there are two main ways the AI can get a poor braking result with the new code. Either they estimate braking is better than it really is, so they brake too late and overshoot. Or they underestimate braking performance and brake too early. Apparently with this example it's the first type of error.

For interest only (and this is an untested theory) I think an important source of error may be the engine braking. The new calculation is based on the actual brakes, and how much brake can be applied before front or rear wheels lock up. But this disregards the engine braking which is acting on some of the wheels.

The old code assumed an ideal braking setup, no matter which corner it is. It assumed brake balance was perfectly set up and aligned with engine braking. Although there is no such 'perfect' setup as it is different for every corner and defends on gear selection and driving style, sometimes this assumption could come up with a better estimate than the new calculation (if the setup was near ideal for the AI drivers).

Maybe I can include an estimate of engine braking to improve the calculation. Although this may be complicated by torque split and engine brake reduction. I won't give up before I've had a look.

Quote from tankslacno :My question is that since changing Live/F11 Settings apply (almost) immediately to a car, how long before AI driver starts braking should we change their brake balance? Or let's ask it this way: how quickly does AI-driver now react to any brake balance changes in F11-window, if not immediately?

It's hard to say but it reinitialises the speeds each time it takes a new curve. But where that curve starts and ends is unknown as it is different for every AI, as it was produced during the racing line optimisation.

Quote from tankslacno :I also want to confirm that the Replay OOS Error also happens in replays recorded in this patch. And I'm sure a certain bike mod causes it, because when I tested D43 with modded GTR-cars, I had no problems when I watched replay of it, but when I did a test race with bikes on this patch, same Replay OOS Error occurred when I did playback it.

This is a concern. If it could be narrowed down to a particular mod or race setup, that would be very helpful.
Scawen
Developer
Thanks for the tests. I don't think that people are saying that something is wrong with your mod. Only that the AI had difficulty driving it to its full potential. I think it's because of the high power with road super tyres. It is a well liked mod and a good test case, so that's why it got attention. Smile

I've been using it for some tests today and now, through the braking code adjustments, it is about 0.7 seconds faster at Westhill International.

Racing alone, lap 2 of 4 lap race:
D42: 2:13.51
NEW: 2:12.84

If other tests work out, this is quite a good result. The new braking prediction is designed to handle brake balance better. I got an XRT and set brake balance to max front and max rear and in both cases it could actually take the troublesome left hander at SO Sprint 2 without clouting the wall. teeembo's Lotus inspired F1 car seems to take all corners on its racing line now.
Scawen
Developer
Quote from BorislavB :I saw that pit limiter light its already updated to flashing.
Is it possible to make when you turn your lights and press flashing button they still to can flash, because whey they are ON now they not flash, only when lights are OFF they can flash.

I can't take take requests on this thread. It is only for reporting issues with the test patch, that were not there before the test patch.

For feature requests please use the special forum section. https://www.lfs.net/forum/8-Improvement-Suggestions
Scawen
Developer
It would be very hard and far beyond the scope of this test patch to make the AI generation work in a separate thread so it doesn't hang between updates while it iterates the path improvements. You should generate offline (and outside of VR) any AI paths you want to use. Maybe you could use a separate LFS instance.

About the speed of AI, it's not your fault but I'm getting a bit tired of explaining so many times, the AI's driving ability (handling of one car, nothing to do with the overtaking) is all specific to the tyre model in question and has already been improved to some extent in the development version, but I will not be working on that for the public version, as it would be pure wasted time.

Nothing about their speed has got worse in the test patches, as I haven't worked on that. But you could verify by starting an earlier exe, run a single AI and see if the lap times are the same. That's your job as a tester really. Smile I assert that their lone car driving ability is not changed. You are welcome to prove me wrong.
Scawen
Developer
First I must say this is not a request thread. Second, your description doesn't mean anything to me. Maybe it's something to do with the fuel usage feature that has already been added? Options - Display - Extra status info?

Please only post here if it is something to do with the test patch. It's very difficult trying to stay on top of everything.
Scawen
Developer
OK, here is another update for AI, Test Patch D42. You should find it a lot safer and better in the pit lane. Also overtakes from a lower speed are better judged (avoided if there is no chance to pass safely because there is not enough time to accelerate).

I still want to look at the max braking judgement calculation, to make it take account of brake balance.


AI:

Improved driving in pit lane when close behind other drivers
Overtaking decision from low speed now allows for acceleration
FIX: Choice of pit stop box was wrong (bug introduced in 0.7B)
FIX: Slow start / stuck in pit stop if max torque at very low rpm
FIX: Errors in fuel calculation related to "Refuelling allowed"

Game:

Reset is now possible during a pit stop if the state is "finished"
FIX: Auto shift *up* did not work if max power rpm above redline

Interface:

FIX: Wrong info was shown in new F11/F12 display in Test Drive mode
FIX: Crash if /track command was used while generating AI path info


https://www.lfs.net/forum/thread/102117
Scawen
Developer
GT4_PL thank you for the comparison videos. They are entertaining. I am pleased to see D41 taking more care, crashing less.

EDIT:

I see that sometimes in D41 the result can be not as good as D40, but there are other examples with a lot of crashing in D40, that doesn't take place in D41. Example, my test with 5 bikes followed by, UF1, XRT, FOX at SO Classic, in D40 the cars would hit the bikes a lot more.

I'm still convinced D41 is better, even if sometimes an AI holds back when we really know it should try to pass. Anyway, D40 was considering passes on *individual* cars ahead, then going if all possible passes were in agreement. Instead, D41 considers the cars ahead as a group, then decides "pass left / pass right / brake". It's a better method which is more predictable. Of course, AI can be improved so much, I could work on it for years or decades. But my main aim was to stop AI ramming and ignoring other cars and bikes.
Last edited by Scawen, .
Scawen
Developer
Thank you all very much for the feedback and reports since Friday's test patch (D41).

Tankslacno, that must be the best presented patch report I have ever received! Smile

I am fixing the things which are definite bugs, especially if they were introduced recently. Some things won't be fixed but I will look at all the reported issues and see what I can do in a short time.


NOTE: I seriously want to move away from AI, as soon as possible, to get back to finish and release the recent updates to the mods editor and system (the intermediate, incompatible patch with the existing physics and graphics). So I'm just trying to round off the most important issues.
Scawen
Developer
I've released D41 with the improved overtaking.

Quote :Interface:

Simple versions of F11/F12 displays are now available during an SPR

AI:

Better line following by bikes (contact patch / effective weight)
Overtakes are considered on a group instead of only individuals
More distant consideration of other vehicles at high speed
Better collision avoidance when close behind or beside
Better estimate of the possibility and duration of a pass
When planning an overtake, time is allowed to pull in after pass
Possible to reset if an approaching vehicle is moving slowly enough
Less rapid turning of the wheel when initiating a pass

I think it's a lot better but there are some remaining issues:

- There is sometimes a hesitation when the AI wants to make a pass, and is just behind and correctly offset from the car in front, so it appears that it should go for it at that point but hangs back a bit.

- Sometimes an AI may collide with another vehicle mid corner, because it has gone in too fast and although it wants to brake, it doesn't think it has enough spare grip to apply the brakes strongly enough.

- They are still a bit too keen to overtake when their current speed is low, because they aren't taking account of the time it will take to accelerate to the speed they should be at.

- Another mistake that I see often is where the vehicle in front has a different line, and can come across in front of the AI behind which doesn't expect that to happen, then there can be a crash.

- I've looked at the calculation for braking and think there is (and always has been) an issue where it assumes the brake balance is *just right* for each corner. I wonder if I can make the braking adapt for the actual brake balance, but I don't have time for that at least today or tomorrow.

- Obviously they are still not as fast as real drivers but I won't be tackling that for this round of test patches.

https://www.lfs.net/forum/thread/102117
Scawen
Developer
Thanks for the comments. I've been running a pretty tough test case repeatedly while I make the improvements. In my debug setups it is deterministic so the same thing happens every time if I don't make any changes.

It's South City Classic with this grid of 5 bikes and 3 cars:

TSR500
REAPER X1
VULCAN 998
CRUISER
SZK 1300R
UF 1000
XR GT TURBO
FORMULA XR

On some rare occasions they have made a lap without any serious collisions. It's hard work trying to get these vehicles to avoid each other as they have such different speeds and lines. Still, I think it's getting better but my head is spinning quite a bit. It is incredibly confusing and frustrating, as any change to fix one problem tends to also have unintended consequences or introduce new bugs.

I look forward to handing it over to you guys for some more testing and I will check your comments again. Some of them are definitely problems I have been trying to deal with.

It's been a longer diversion than expected bit I do believe it is important.
Scawen
Developer
I actually find it easier to work when people don't constantly antagonise me.

And you are trying to bug me, because I have told you countless times that this is the test patch thread, which is to discuss changes in the test patch. There is no other purpose for this thread.

I'm working 11 hours a day trying to finish things to get onto the other thing I was working on, so I can get back onto the other thing i was working on before that.

But your constant nagging at me, just makes me annoyed, less willing to put in that amount of work time. It may be a strange concept, but not really surprising when you think about it, that it's easier to work for people if they aren't annoying you.
Scawen
Developer
Quote from Viperakecske :How do we fix fps stuttering when someone leaves the pit whit mod car?

1) If there is a bad glitch with a particular mod, you should talk to the mod creator and make sure they use the latest editor test patch. Since editor version D26 there are limits on the number of triangles in the second LOD (shadow LOD). Often mod creators have been lazy and instead of spending a short time to make a low poly shadow mesh, they instead made a direct copy of the main mesh. The recent editor test patches impose limits on that.

2) In the development version which we are all waiting for, there is delayed texture loading, so the car is initially created, but the textures load over subsequent graphical frames, instead of loading them all at once.

3) This has nothing to do with the test patch.
Scawen
Developer
Thanks for the report. That crash isn't in the LFS.exe module so I can't narrow it down to the region of code that caused it. There are some undocumented crash fixes in the test patches, related to mods that have not yet loaded, so I hope maybe one of those fixes is the reason why the test patches aren't crashing.
Scawen
Developer
Of course, the best racing is with real players. But they aren't always available when you want to race, and some people (sometimes) enjoy racing alone without the need to interact and cooperate with other people. So there will always be a need for AI drivers.

I've done some AI improvements in the last few test patches. You can read the descriptions here, see the notes for D37 to D40:
https://www.lfs.net/forum/thread/102117

Feedback will be welcome, on the test patch thread. There are definitely some improvements but please let me know if I've made something worse by mistake. AI is pretty tricky to get right!
Scawen
Developer
Thanks for that, I was able to reproduce it in a deterministic game setup. It turns out a bit of an obscure bug that could sometimes cause AI to hit the brakes if they are slightly faster than another other car, but the other car is accelerating.

It seems like an old bug that has been there forever, but maybe it became slightly more likely to happen in the latest patch. It wouldn't be limited to the start grid, so maybe there will be some times out on the track when a car would have braked momentarily for no apparent reason.

I'll release another test patch with this and probably another couple of updates either today or tomorrow.


EDIT: Unfortunately, this bug fix hasn't magically fixed the issue where a faster car gets stupidly stuck behind a slower car, all the way down a long straight. Uhmm
Last edited by Scawen, .
Scawen
Developer
D39 is now available with AI improvements. I recommend deleting the bike AI paths created in test patches D37 or D38 (since 11 September) as the bikes now have a narrower theoretical width. Existing paths will still work but new ones will allow the bikes to use a bit more of the track.

Bike AI:

Smaller assumed width (closer passing distance / better lines)
For best results, delete bike knw files from data\knw folder
(generated since 11 September in D37 or D38 test patches)

Overtaking AI: (all vehicles)

Various improvements to improve the overtaking decisions
There should be fewer dangerous overtakes in braking zones

https://www.lfs.net/forum/thread/102117
Scawen
Developer
Thanks for the feedback. I've released D38 with three changes to much improve the mass pileup issue.

AI should be less likely to try passing in braking zones
FIX: AI can now reset if in contact with a stationary vehicle
FIX: AI will not cut engine after 40 seconds waiting to reset

I hope it doesn't break anything! The 'FIX' items are easy to test but it's a lot harder for me to test and confirm the results of the passing improvement. I think they make fewer bad passes because they take into account their predicted lower speed because they are braking. Although I did still see a pass that was obviously a bad idea, so I'm not certain how much better it is.

https://www.lfs.net/forum/thread/102117

EDIT: The fix "AI can now reset if in contact with a stationary vehicle" will not work if you are online, until new servers are released. That is because when online the "safe to reset" decision is made on the server.
Last edited by Scawen, .
Scawen
Developer
I've done some AI updates and copied them into the D37 test patch.

AI can now drive objects (do nothing) or motorbikes (slowly)

EDIT: AI can also enter in configs with no path, but will just sit there.

This started from a request to allow the AI to use objects, so they can be tested offline. It's an old thing on my list. But it seemed best to allow all mods, not just objects. That means motorbikes had to be supported. Well, a "few hours" turned into quite a few days. So, sorry about the delay to other things. I have stopped short of trying to really get the best out of them. There are issues with the tyre physics and the bikes actually work better in the new tyre physics.

If you are interested in object mods or bikes, please have a go with the new AI code. It was hard to get them to go round at all on bikes, then there was quite a struggle to get them to leave or enter pits. Hopefully I haven't broken anything for the other AI!

EDIT: Some bikes are too wobbly and crash too often, but maybe you can let me know if enough bikes seem to ride OK at enough tracks.

I know some people will be upset at another delay, but this is an important part of finishing the mods system. Other people will have fun using these AI updates. I've still got the incompatible updates including wheel rim improvements to release in the next few days.

https://www.lfs.net/forum/thread/102117
Last edited by Scawen, .
FGED GREDG RDFGDR GSFDG